package com.chap1.tools;

import java.util.concurrent.TimeUnit;

/**
 * <p>
 * <code>SleepTools</code>
 * </p>
 *
 * @author junbao3
 * TODO
 * @date 2023-03-20 13:57
 * Copyright (C) 2021 IFlyTek. All rights reserved.
 */
public class SleepTools {
    /*
    按秒休眠
    */
    public static final void second(int seconds){
        try {
            TimeUnit.SECONDS.sleep(seconds);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
    }
    /*
        按毫秒休眠
        */
    public static final void ms(int ms){
        try {
            TimeUnit.MILLISECONDS.sleep(ms);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
    }
}
